home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qlib205.zip / QLIB.ZIP / TXT / CALLP.TXT < prev    next >
Text File  |  1996-11-01  |  2KB  |  48 lines

  1. callp
  2. -----
  3.  
  4. There are some things you must understand about callp:
  5.  
  6. As you should know 'callp' is a macro I made to replace INVOKE and you
  7. may freely use it (I recommend it over INVOKE greatly), it's in qlib.inc
  8.  
  9. (C programmers should not be concerned with this)
  10.  
  11. You should just know how it works so you can avoid some things:
  12.   Features/advantages/disadvantages :
  13.     - all args are zero extended to DWORDs (regardless of what the PROC wants)
  14.       (hey, it's just a macro)
  15.       (it trashing eax sometimes but you shall be warned if you try and use
  16.        eax if it's been trashed)
  17.     - QWORDs are pushed properly now
  18.     - FWORDs are zero extended to QWORDs (does NOT trash eax)
  19.     - no augment matching is performed at all (it's just a simple macro)
  20.     - if a constant is given it is pushed as a DWORD - this is the only
  21.       real problem if a FWORD or QWORD is expected by the proc then it will
  22.       not get it properly (and all other args after that)
  23.     - knows that segment registers are 32bits (unlike INVOKE which messes
  24.       up the stack and crashes your programs)
  25.     - properly extends args (INVOKE does not always properly extend them -
  26.        ie : Proc expects DWORD and you pass a WORD, Masm should push a word
  27.        0 then the WORD, but instead it pushes DWORD 0 then the WORD (stack
  28.        messed up and program crashes))
  29.  
  30. So don't use INVOKE (it sux) and use callp.  You should never have any more
  31. problems again... (NOTE: INVOKE only bombs like this in 32bit segments,
  32. as far as I know in 16bit ones it works ok) (but who works in 16bit modes
  33. anymore?)
  34.  
  35. If you don't want to use callp and want the speed that INVOKE gives
  36. keep harasing MS until they fix INVOKE! (renaming it to CALL would be nice too)
  37.     call 1-905-568-3503 (Toronto)
  38.     or   1-800-759-5474 (Developers Network?)
  39.     or   1-800-936-4300 (Automation help)  (press 5 for MASM V6.1 ??)
  40.                                (gee isn't V6.11 out yet !!)
  41.  
  42. Please report any problems/bugs to me (concerning callp).
  43. mailto:subdeath@globalserve.net
  44.  
  45. http://www.globalserve.net/~subdeath
  46.  
  47.  
  48.